<!--
Copyright 2010 HELP Lab @ Washington State University

This file is part of ChemProV (http://helplab.org/chemprov).

ChemProV is distributed under the Open Software License ("OSL") v3.0.
Consult "LICENSE.txt" included in this package for the complete OSL license.
-->
<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:ChemProV.UI.PalletItems" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="ChemProV.UI.PalletItems.ProcessUnitPalette" 
    Width="Auto" Height="Auto">
    <Grid x:Name="MasterGrid">
        <StackPanel x:Name="LayoutRoot" Orientation="Vertical">
            <local:GenericPaletteItem x:Name="DefaultSelection" IconSource="/UI/Icons/palette_select.png" Description="Select" Selected="True" />
            <Rectangle Width="Auto" Height="2" Fill="Gray" Margin="0,5,0,5" />
            <local:GenericPaletteItem x:Name="StickyNote" IconSource="/UI/Icons/palette_stickyNote.png" Description="Sticky Note" Selected="False" />
            <Grid x:Name="ProcessUnitCategory" Margin="2" d:LayoutOverrides="Width, HorizontalMargin" MouseEnter="CategorySelector_MouseEnter" MouseLeave="CategorySelector_MouseLeave">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="44" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Image x:Name="ProcessUnitCategoryIcon" 
				Source="/UI/Icons/pu.png" 
				Grid.Row="0" 
				Grid.Column="0" 
				Stretch="Fill"
				Width="40"
				Height="40"
				Margin="0,0,4,0"
               />
                <TextBlock x:Name="ProcessUnitCategoryDescription" 
				Grid.Row="0" 
				Grid.Column="1" 
				VerticalAlignment="Center"
				Text="Process Units"
				TextWrapping="Wrap"
				Width="100"
                   />
                <Polygon Fill="Black" Points="0,0 0,10, 5,5" Grid.Column="1" Margin="95,2,0,0" Width="5" Height="10" />
            </Grid>
            <Grid x:Name="StreamsCategory" Margin="2" d:LayoutOverrides="Width, HorizontalMargin" MouseEnter="CategorySelector_MouseEnter" MouseLeave="CategorySelector_MouseLeave">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="44" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Image x:Name="StreamsCategoryIcon" 
				Source="/UI/Icons/pu_stream.png" 
				Grid.Row="0" 
				Grid.Column="0" 
				Stretch="Fill"
				Width="40"
				Height="40"
				Margin="0,0,4,0"
               />
                <TextBlock x:Name="StreamsCategoryDescription" 
				Grid.Row="0" 
				Grid.Column="1" 
				VerticalAlignment="Center"
				TextWrapping="Wrap"
				Width="100"
                   ><Run Text="Streams"/><LineBreak/><Run/></TextBlock>
                <Polygon Fill="Black" Points="0,0 0,10, 5,5" Grid.Column="1" Margin="95,2,0,0" Width="5" Height="10" />
            </Grid>
        </StackPanel>
        <Popup Height="220" Width="148"  x:Name="ProcessUnitFlyOut" Margin="148,100,-154,-69" Canvas.ZIndex="255" IsOpen="False" Opened="FlyOut_Opened">
            <Border Background="White" MouseEnter="FlyOut_MouseEnter" MouseLeave="FlyOut_MouseLeave" BorderThickness="2" BorderBrush="Black">
                <StackPanel x:Name="ProcessUnit_StackPanel">
                    <local:ProcessUnitPaletteItem ProcessUnit="Mixer" />
                    <local:ProcessUnitPaletteItem ProcessUnit="Separator" />
                    <local:ProcessUnitPaletteItem ProcessUnit="Reactor" />
                    <local:ProcessUnitPaletteItem ProcessUnit="HeatExchanger" />
                    <local:ProcessUnitPaletteItem ProcessUnit="HeatExchangerNoUtility" />
                </StackPanel>
            </Border>
        </Popup>
        <Popup Height="220" Width="148"  x:Name="StreamsFlyOut" Margin="148,140,-154,-69" Canvas.ZIndex="255" IsOpen="False" AllowDrop="False" Opened="FlyOut_Opened">
            <Border Background="White" MouseEnter="FlyOut_MouseEnter" MouseLeave="FlyOut_MouseLeave" BorderThickness="2" BorderBrush="Black">
                <StackPanel x:Name="Streams_StackPanel">
                    <local:StreamPaletteItem Stream="Chemical" Description="Chemical Stream" />
                    <local:StreamPaletteItem Stream="Heat" Description="Heat Stream" />
                </StackPanel>
            </Border>
        </Popup>
    </Grid>
</UserControl>
